package com.salton123.bmob.bargain

import cn.bmob.v3.BmobObject

/**
 * User: newSalton@outlook.com
 * Date: 2020-01-25 17:04
 * ModifyTime: 17:04
 * Description:
 * bargainType 0->自定义,1->京东,
 * bargainLevel为二进制标记符号，第一位表示是否优质推荐
 */

class BargainItem(
    var fromUserId: String = "",
    var fromUserIcon: String = "",
    var remindCount: Int = 0,
    var totalCount: Int = 10,
    var bargainType: Int = 0,
    var bargainTitle: String = "",
    var bargainPrice: Int = 500,
    var bargainLevel: Int = 0
) : BmobObject() {
    companion object {
        fun getTypeStr(bargainType: Int? = 0): String {
            when (bargainType) {
                0 -> {
                    return "自定义"
                }
                1 -> {
                    return "京东"
                }
                2 -> {
                    return "大单"
                }

                4 -> {
                    return "推荐"
                }
                3 -> {
                    return "其他"
                }
                else -> {
                    return "其他"
                }
            }
        }
    }
}